<div class="modal-header">
	<button type="button" class="close" ng-click="vm.cancel()">&times;</button>
	<h4 class="modal-title">修改用户信息</h4>
</div>
<div class="modal-body">
	<form name="userForm" class="form">
		<div class="form-group">
			<label>用户名</label>
			<input type="text" class="form-control" name="name" ng-model="vm.name" ng-disabled="true" />
		</div>

		<div class="form-group">
			<label>原始密码</label>
			<input type="password" class="form-control" name="oldPassword" ng-model="vm.oldPassword" required autofocus="">
			<div ng-if="vm.submitted || userForm.oldPassword.$dirty" ng-messages="userForm.oldPassword.$error">
				<label class="error-messages" ng-message="required"><i></i>不能为空</label>
			</div>
		</div>

		<div class="form-group">
			<label>新密码</label>
			<input type="password" class="form-control" name="newPassword" ng-model="vm.newPassword" maxlength="30" ng-minlength="8" validator-password required>
			<div ng-if="vm.submitted || userForm.newPassword.$dirty" ng-messages="userForm.newPassword.$error">
				<label class="error-messages" ng-message="required"><i></i>不能为空</label>
        <label class="error-messages" ng-message="minlength"><i></i>最小8位字符</label>
				<label class="error-messages" ng-message="password"><i></i>由数字和字母组成，必须同时包含大小写字母，最多30位</label>
			</div>
		</div>
		<div class="form-group">
			<label>确认密码</label>
			<input type="password" class="form-control" name="confirmPassword" ng-model="vm.confirmPassword" validator-match="{{vm.newPassword}}" required>
			<div ng-if="vm.submitted || userForm.confirmPassword.$dirty" ng-messages="userForm.confirmPassword.$error">
				<label class="error-messages" ng-message="required"><i></i>不能为空</label>
				<label class="error-messages" ng-message="match"><i></i>两次密码不一致</label>
			</div>
		</div>
	</form>
</div>
<div class="modal-footer">
	<a class="btn btn-default-dark" data-dismiss="modal" ng-click="vm.submit(userForm);">确定</a>
	<a class="btn btn-default-light" data-dismiss="modal" ng-click="vm.cancel();">取消</a>
</div>
